import { Component } from '@tarojs/taro'
import { View, Text,Image} from '@tarojs/components'
// import {} from 'taro-ui'
import './myyouhuiquan.css'
import yq from '../../img/youhuiquan4.png'
import by from '../../img/banyuan.png'
import right from '../../img/right.png'
import yinzhang from '../../img/yinzhang.png'


export default class YouhuiquanTow extends Component {

  config = {
    navigationBarTitleText: '爱眼医生'
  }
  constructor () {
    super(...arguments)
    this.state = {

    }
    this.props={

        textinfo:{
            discount:"discount",
            full_money:"full_money",
            title:"title",
            scope:"scope",
            end_time:"end_time",
            use_type:"use_type",
            status:'status',
            coupon_type:'coupon_type'
        },
        onXiangqing:()=>{},
    }
  }

  render () {
    //   let price =  this.state.texinfo.price
    //   let keyong = this.state.textifo.keyong  style='background-color:#bfbfbf'

    return (
        <View className="myCoopn">          
            <View className="card2" >
                <Image className='card-by' src={by}/>
                <View className="card-info">
                {this.props.textinfo.coupon_type == "满减"
                ?   <Text className='card-info1'>￥{parseFloat(this.props.textinfo.discount.toString())}</Text>
                :   <Text className='card-info1'>{this.props.textinfo.discount}折</Text>
                }
                <Text className='card-info3'>满{parseFloat(this.props.textinfo.full_money.toString())}元可用</Text>
                </View>
                <Image className='card-yq' src={yq}/>
            </View>
            <View className='card-content2'>
                <View className="card-content-title2">
                   <Text>{this.props.textinfo.title}</Text> 
                </View>
                <View className='card-content-row'>
                    <View className='card-content-text'>
                        <Text>适用项目:  {this.props.textinfo.scope}</Text>
                        <Text>有效期至:  {this.props.textinfo.end_time}</Text>
                    </View>
                </View>
                <View className='many' onClick={this.props.onXiangqing}>详细说明 <Image style='height:10px;width:10px;' src={right}/></View>
            </View>
            <View className='content-yingzhang'>
                <View><Image style='height:60px; width:60px;' src={yinzhang}/></View>
                <View className='yingzhangTitle'><Text>{this.props.textinfo.status}</Text></View>
            </View>
        </View> 
    )
  }
}